<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        li:first-child{
            background: yellow;
        }
        li:last-child{
            background: red;
        }
        /* 第几个 */
        /* li:nth-child(2){
            background: blue;
        } */
        /* 第几个，偶数2n或even */
        li:nth-child(2n){
            background: blue;
        }
        /* 奇数2n+1或2n-1或odd */
        /* li:nth-child(odd){
            background: blue;
        } */
        

    </style>
</head>
<body>
    <ul>
        <li>11111</li>
        <li>22222</li>
        <li>33333</li>
        <li>44444</li>
        <li>55555</li>
    </ul>
</body>
</html>